﻿/// -----------------------------------------------------------------------------------------------------------
/// Module      :  AzureStorageTypes.cs
/// Description :  This class represents a type defined in the AzureStorageTypes.xsd Xml Schema.
/// -----------------------------------------------------------------------------------------------------------

#region Using directives

using System;
using System.IO;
using System.Reflection;
using System.Xml;
using System.Xml.Schema;

using Microsoft.ServiceModel.Channels.Common;

#endregion

using BizTalkFactory.Adapters.AzureStorage.StorageAdapterConstants;

namespace BizTalkFactory.Adapters.AzureStorage
{
    public class AzureStorageTypes : SchemaQualifiedType
    {
        public AzureStorageTypes(string typeId, string typeName)
            : base(typeId, typeName)
        {
            TypeNamespace = AzureStorageAdapter.SERVICENAMESPACE + "/" + MetadataTypeIds.GenericType;
        }

        protected override string ReplaceTokens(string format)
        {
            return format
                .Replace("%{scheme}%", AzureStorageAdapter.SCHEME)
                .Replace("%{namespace}%", TypeNamespace)
                ;
        }
    }
}
